package programme;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class CollectionsDemo {

	
	public static void main(String[] args) {
		
		List<Integer> list = new ArrayList<Integer>();
		list.add(20);
		list.add(25);
		list.add(0,20);
	
		System.out.println(list.get(2));
		
		System.out.println(list.contains(25));
		
		for(int i : list){
			System.out.println(i);
		}
		
		Set<String> set = new HashSet<String>();
		System.out.println(set.add("text"));
		System.out.println(set.add("noch ein text"));
		System.out.println(set.add("text"));
		System.out.println(set.size());
	}
	
}
